﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using ACCOUNTING.My;
    using ACCOUNTING.My.Resources;
    using C1.Win.C1FlexGrid;
    using C1.Win.C1FlexGrid.Util.BaseControls;
    using Microsoft.VisualBasic;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_CapNhatGiaBan : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("CboHangSanXuat")]
        private ComboBox _CboHangSanXuat;
        [AccessedThroughProperty("CboLoaiTien")]
        private ComboBox _CboLoaiTien;
        [AccessedThroughProperty("CboNhomHang")]
        private ComboBox _CboNhomHang;
        [AccessedThroughProperty("CmdCapNhatTuDong")]
        private Button _CmdCapNhatTuDong;
        [AccessedThroughProperty("CmdLoc")]
        private Button _CmdLoc;
        [AccessedThroughProperty("Label1")]
        private Label _Label1;
        [AccessedThroughProperty("Label11")]
        private Label _Label11;
        [AccessedThroughProperty("Label2")]
        private Label _Label2;
        [AccessedThroughProperty("Label25")]
        private Label _Label25;
        [AccessedThroughProperty("Label3")]
        private Label _Label3;
        [AccessedThroughProperty("Panel1")]
        private Panel _Panel1;
        [AccessedThroughProperty("Panel3")]
        private Panel _Panel3;
        [AccessedThroughProperty("TxtSearchMa")]
        private TextBox _TxtSearchMa;
        [AccessedThroughProperty("TxtSearchTen")]
        private TextBox _TxtSearchTen;
        [AccessedThroughProperty("VSlist")]
        private C1.Win.C1FlexGrid.C1FlexGrid _VSlist;
        private IContainer components;
        private bool IsLoaded;
        private bool mAllowAdd;
        private bool mAllowDel;
        private bool mAllowEdit;
        private bool mAllowView;
        private clsGiaBan objGB;
        private clsDMLoaiGia objLG;
        private clsDMLoaiTien objLT;
        private DataTable pData;
        private DataView pDtView;

        public Frm_CapNhatGiaBan()
        {
            base.Load += new EventHandler(this.Frm_CapNhatGia_Load);
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.objGB = new clsGiaBan();
            this.objLG = new clsDMLoaiGia();
            this.objLT = new clsDMLoaiTien();
            this.InitializeComponent();
        }

        private void CboHangSanXuat_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (this.IsLoaded)
            {
                this.LoadData();
            }
        }

        private void CboLoaiTien_SelectedIndexChanged(object sender, EventArgs e)
        {
            this.LoadData();
        }

        private void CboNhomHang_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (this.IsLoaded)
            {
                this.LoadData();
            }
        }

        private void CmdCapNhatTuDong_Click(object sender, EventArgs e)
        {
            int num2 = this.VSlist.Rows.Count - 1;
            for (int i = 1; i <= num2; i++)
            {
                RowColEventArgs args = new RowColEventArgs(i, 4);
                this.VSlist_AfterEdit(this.VSlist, args);
            }
        }

        private void CmdClose_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void Frm_CapNhatGia_Load(object sender, EventArgs e)
        {
            LVYModule.GetUserRight(ref this.mAllowView, ref this.mAllowDel, ref this.mAllowEdit, ref this.mAllowAdd, Conversions.ToString(this.Tag), modGeneral.H_USERNAME);
            if (!this.mAllowView)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn kh\x00f4ng c\x00f3 quyền xem, li\x00ean hệ với người quản trị để biết th\x00eam chi tiết.", ""));
                this.Dispose();
            }
            else
            {
                this.IsLoaded = false;
                BuildComboModule.BuildCombo(this.CboNhomHang, modGeneral.ListDanhMuc.NhomHangHoa, true, "", "");
                BuildComboModule.BuildCombo(this.CboHangSanXuat, modGeneral.ListDanhMuc.HangSanXuat, true, "", "");
                BuildComboModule.BuildCombo(this.CboLoaiTien, modGeneral.ListDanhMuc.LoaiTien, false, "", "");
                this.CboLoaiTien.SelectedValue = modGeneral.H_CURRENCY;
                this.IsLoaded = true;
                this.LoadData();
            }
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_CapNhatGiaBan));
            this.VSlist = new C1.Win.C1FlexGrid.C1FlexGrid();
            this.CboNhomHang = new ComboBox();
            this.Panel1 = new Panel();
            this.CboLoaiTien = new ComboBox();
            this.Label3 = new Label();
            this.CmdCapNhatTuDong = new Button();
            this.CmdLoc = new Button();
            this.Label25 = new Label();
            this.CboHangSanXuat = new ComboBox();
            this.Label11 = new Label();
            this.Panel3 = new Panel();
            this.Label2 = new Label();
            this.Label1 = new Label();
            this.TxtSearchTen = new TextBox();
            this.TxtSearchMa = new TextBox();
            this.VSlist.BeginInit();
            this.Panel1.SuspendLayout();
            this.Panel3.SuspendLayout();
            this.SuspendLayout();
            this.VSlist.BorderStyle = C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.FixedSingle;
            this.VSlist.ColumnInfo = manager.GetString("VSlist.ColumnInfo");
            this.VSlist.Dock = DockStyle.Fill;
            this.VSlist.ExtendLastCol = true;
            this.VSlist.FocusRect = FocusRectEnum.Solid;
            this.VSlist.KeyActionTab = KeyActionEnum.MoveAcross;
            Point point = new Point(0, 0x2f);
            this.VSlist.Location = point;
            Padding padding = new Padding(0);
            this.VSlist.Margin = padding;
            this.VSlist.Name = "VSlist";
            this.VSlist.Rows.Count = 1;
            this.VSlist.Rows.DefaultSize = 0x11;
            this.VSlist.ShowCellLabels = true;
            Size size = new Size(0x2f0, 0x1ba);
            this.VSlist.Size = size;
            this.VSlist.StyleInfo = manager.GetString("VSlist.StyleInfo");
            this.VSlist.TabIndex = 0;
            this.VSlist.VisualStyle = VisualStyle.Office2007Blue;
            this.CboNhomHang.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboNhomHang.FormattingEnabled = true;
            point = new Point(8, 0x16);
            this.CboNhomHang.Location = point;
            this.CboNhomHang.Name = "CboNhomHang";
            size = new Size(0xc1, 0x15);
            this.CboNhomHang.Size = size;
            this.CboNhomHang.TabIndex = 1;
            this.Panel1.BackgroundImage = ACCOUNTING.My.Resources.Resources.bgleft;
            this.Panel1.Controls.Add(this.CboLoaiTien);
            this.Panel1.Controls.Add(this.Label3);
            this.Panel1.Controls.Add(this.CmdCapNhatTuDong);
            this.Panel1.Controls.Add(this.CmdLoc);
            this.Panel1.Controls.Add(this.Label25);
            this.Panel1.Controls.Add(this.CboHangSanXuat);
            this.Panel1.Controls.Add(this.CboNhomHang);
            this.Panel1.Controls.Add(this.Label11);
            this.Panel1.Dock = DockStyle.Top;
            point = new Point(0, 0);
            this.Panel1.Location = point;
            this.Panel1.Name = "Panel1";
            size = new Size(0x2f0, 0x2f);
            this.Panel1.Size = size;
            this.Panel1.TabIndex = 0x12;
            this.CboLoaiTien.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboLoaiTien.FormattingEnabled = true;
            point = new Point(0x18f, 0x16);
            this.CboLoaiTien.Location = point;
            this.CboLoaiTien.Name = "CboLoaiTien";
            size = new Size(0x7b, 0x15);
            this.CboLoaiTien.Size = size;
            this.CboLoaiTien.TabIndex = 3;
            this.Label3.AutoSize = true;
            this.Label3.BackColor = Color.Transparent;
            point = new Point(0x18c, 5);
            this.Label3.Location = point;
            this.Label3.Name = "Label3";
            size = new Size(0x2f, 13);
            this.Label3.Size = size;
            this.Label3.TabIndex = 0x42;
            this.Label3.Text = "Loại tiền";
            this.Label3.TextAlign = ContentAlignment.TopRight;
            point = new Point(0x219, 0x13);
            this.CmdCapNhatTuDong.Location = point;
            this.CmdCapNhatTuDong.Name = "CmdCapNhatTuDong";
            size = new Size(0x62, 0x18);
            this.CmdCapNhatTuDong.Size = size;
            this.CmdCapNhatTuDong.TabIndex = 4;
            this.CmdCapNhatTuDong.Text = "T\x00ednh lại gi\x00e1 b\x00e1n";
            this.CmdCapNhatTuDong.UseVisualStyleBackColor = true;
            this.CmdCapNhatTuDong.Visible = false;
            this.CmdLoc.Image = ACCOUNTING.My.Resources.Resources.view;
            this.CmdLoc.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0x18f, 0x30);
            this.CmdLoc.Location = point;
            this.CmdLoc.Name = "CmdLoc";
            size = new Size(0x3f, 0x18);
            this.CmdLoc.Size = size;
            this.CmdLoc.TabIndex = 0x3f;
            this.CmdLoc.Text = "Lọc";
            this.CmdLoc.UseVisualStyleBackColor = true;
            this.Label25.AutoSize = true;
            this.Label25.BackColor = Color.Transparent;
            this.Label25.ForeColor = Color.Black;
            point = new Point(0xcc, 5);
            this.Label25.Location = point;
            this.Label25.Name = "Label25";
            size = new Size(0x4c, 13);
            this.Label25.Size = size;
            this.Label25.TabIndex = 0x3e;
            this.Label25.Text = "&H\x00e3ng sản xuất";
            this.CboHangSanXuat.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboHangSanXuat.FormattingEnabled = true;
            point = new Point(0xcf, 0x16);
            this.CboHangSanXuat.Location = point;
            this.CboHangSanXuat.Name = "CboHangSanXuat";
            size = new Size(0xbb, 0x15);
            this.CboHangSanXuat.Size = size;
            this.CboHangSanXuat.TabIndex = 2;
            this.Label11.AutoSize = true;
            this.Label11.BackColor = Color.Transparent;
            this.Label11.ForeColor = Color.Black;
            point = new Point(4, 4);
            this.Label11.Location = point;
            this.Label11.Name = "Label11";
            size = new Size(0x53, 13);
            this.Label11.Size = size;
            this.Label11.TabIndex = 0;
            this.Label11.Text = "&Nh\x00f3m h\x00e0ng h\x00f3a";
            this.Label11.TextAlign = ContentAlignment.TopRight;
            this.Panel3.BackgroundImage = ACCOUNTING.My.Resources.Resources.bgleft;
            this.Panel3.Controls.Add(this.Label2);
            this.Panel3.Controls.Add(this.Label1);
            this.Panel3.Controls.Add(this.TxtSearchTen);
            this.Panel3.Controls.Add(this.TxtSearchMa);
            this.Panel3.Dock = DockStyle.Bottom;
            point = new Point(0, 0x1e9);
            this.Panel3.Location = point;
            this.Panel3.Name = "Panel3";
            size = new Size(0x2f0, 40);
            this.Panel3.Size = size;
            this.Panel3.TabIndex = 20;
            this.Label2.AutoSize = true;
            this.Label2.BackColor = Color.Transparent;
            point = new Point(0x68, 0x18);
            this.Label2.Location = point;
            this.Label2.Name = "Label2";
            size = new Size(0x2a, 13);
            this.Label2.Size = size;
            this.Label2.TabIndex = 0x42;
            this.Label2.Text = "&T\x00ecm t\x00ean";
            this.Label2.TextAlign = ContentAlignment.TopRight;
            this.Label1.AutoSize = true;
            this.Label1.BackColor = Color.Transparent;
            point = new Point(0, 0x18);
            this.Label1.Location = point;
            this.Label1.Name = "Label1";
            size = new Size(0x29, 13);
            this.Label1.Size = size;
            this.Label1.TabIndex = 0x40;
            this.Label1.Text = "T\x00ecm &m\x00e3";
            this.Label1.TextAlign = ContentAlignment.TopRight;
            point = new Point(0x6c, 3);
            this.TxtSearchTen.Location = point;
            this.TxtSearchTen.Name = "TxtSearchTen";
            size = new Size(0xf8, 20);
            this.TxtSearchTen.Size = size;
            this.TxtSearchTen.TabIndex = 1;
            point = new Point(3, 3);
            this.TxtSearchMa.Location = point;
            this.TxtSearchMa.Name = "TxtSearchMa";
            size = new Size(0x67, 20);
            this.TxtSearchMa.Size = size;
            this.TxtSearchMa.TabIndex = 0;
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            this.BackgroundImage = ACCOUNTING.My.Resources.Resources.background;
            size = new Size(0x2f0, 0x211);
            this.ClientSize = size;
            this.Controls.Add(this.VSlist);
            this.Controls.Add(this.Panel1);
            this.Controls.Add(this.Panel3);
            this.MinimizeBox = false;
            this.Name = "Frm_CapNhatGiaBan";
            this.ShowIcon = false;
            this.ShowInTaskbar = false;
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Tag = "BH-0001";
            this.Text = "CAP NHAT GIA BAN";
            this.VSlist.EndInit();
            this.Panel1.ResumeLayout(false);
            this.Panel1.PerformLayout();
            this.Panel3.ResumeLayout(false);
            this.Panel3.PerformLayout();
            this.ResumeLayout(false);
        }

        public void LoadData()
        {
            if (this.IsLoaded)
            {
                this.Cursor = Cursors.WaitCursor;
                string pKhoa = "";
                if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiTien.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() != "")
                {
                    int num3;
                    this.objLT.LoadByCode(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiTien.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim());
                    string str = modGeneral.H_FORMATNUMBER + "." + LVYModule.sRight("0000000000", this.objLT.SoLe);
                    this.pData = this.objGB.GetList(Conversions.ToString(this.CboLoaiTien.SelectedValue), LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboNhomHang.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim(), LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboHangSanXuat.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim());
                    this.pDtView = new DataView(this.pData);
                    this.VSlist.DataSource = this.pDtView;
                    this.VSlist.Cols[0].Visible = false;
                    this.VSlist.Cols[1].Width = 100;
                    this.VSlist.Cols[2].Width = 240;
                    this.VSlist[0, 1] = modGeneral.Tranlated("M\x00e3 h\x00e0ng h\x00f3a", "");
                    this.VSlist[0, 2] = modGeneral.Tranlated("T\x00ean h\x00e0ng h\x00f3a", "");
                    this.VSlist[0, 3] = modGeneral.Tranlated("Đơn vị t\x00ednh", "");
                    int num6 = this.VSlist.Cols.Count - 1;
                    for (num3 = 4; num3 <= num6; num3++)
                    {
                        pKhoa = LVYModule.sRight(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[0, num3]), "", modGeneral.TypeOfValue.Nothing).ToString(), 15);
                        this.objLG.Load(pKhoa);
                        if (modGeneral.H_LANGUAGE == "VIET")
                        {
                            this.VSlist[0, num3] = this.objLG.TenViet;
                        }
                        else
                        {
                            this.VSlist[0, num3] = this.objLG.TenAnh;
                        }
                        this.VSlist.Cols[num3].DataType = System.Type.GetType("System.Decimal");
                        this.VSlist.Cols[num3].Format = str;
                        this.VSlist.Cols[num3].Width = 100;
                    }
                    this.VSlist.Styles.Alternate.BackColor = ProfessionalColors.ToolStripGradientMiddle;
                    int count = this.VSlist.Cols.Count;
                    int width = this.VSlist.Cols[count - 1].Right + 2;
                    Size clientSize = this.ClientSize;
                    int height = clientSize.Height;
                    width += SystemInformation.VerticalScrollBarWidth;
                    if (width < 800)
                    {
                        int num5 = 0;
                        width = 800;
                        int num7 = this.VSlist.Cols.Count - 1;
                        for (num3 = 0; num3 <= num7; num3++)
                        {
                            if (this.VSlist.Cols[num3].Visible & (num3 != 2))
                            {
                                num5 += this.VSlist.Cols[num3].Width;
                            }
                        }
                        num5 += SystemInformation.VerticalScrollBarWidth;
                        this.VSlist.Cols[2].Width = (width - num5) - SystemInformation.VerticalScrollBarWidth;
                    }
                    if (width >= MyProject.Forms.FRMMAIN.Width)
                    {
                        this.WindowState = FormWindowState.Maximized;
                    }
                    else
                    {
                        height = 600;
                        clientSize = new Size(width, height);
                        this.ClientSize = clientSize;
                        this.CenterToScreen();
                    }
                    this.Cursor = Cursors.Default;
                }
            }
        }

        public bool SaveData(int nRow, int nCol)
        {
            bool flag=false;
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiTien.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() == "")
            {
                return false;
            }
            string str = LVYModule.sRight(this.pData.Columns[nCol].ColumnName.Trim(), 15);
            clsGiaBan objGB = this.objGB;
            objGB.KhoaHangHoa = Conversions.ToString(this.VSlist[nRow, 0]);
            objGB.KhoaLoaiGia = str;
            objGB.LoaiTien = Conversions.ToString(this.CboLoaiTien.SelectedValue);
            objGB.GiaBan = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[nRow, nCol]), 0, modGeneral.TypeOfValue.Nothing));
            objGB.KhoaNhanVienCapNhat = modGeneral.H_USERID;
            objGB.NgayBatDau = LVYModule.Date2Char(Strings.Format(DateAndTime.Today, "dd/MM/yyyy"));
            return objGB.SaveData();
            objGB = null;
            return flag;
        }

        public void Search(string strCode, string strName)
        {
            string left = "";
            if (strCode.Trim() != "")
            {
                left = "Ma LIKE '%" + strCode + "%'";
            }
            if (strName.Trim() != "")
            {
                left = Conversions.ToString(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(left, Interaction.IIf(left.Trim() != "", " And TenHang LIKE '%" + strName + "%'", " Ten LIKE '%" + strName + "%'")));
            }
            this.pDtView.RowFilter = left;
            if (this.VSlist.Rows.Count != 1)
            {
                this.VSlist.Select(1, 0, 1, this.VSlist.Cols.Count - 1);
            }
        }

        private void TxtSearchMa_TextChanged(object sender, EventArgs e)
        {
            this.Search(this.TxtSearchMa.Text, this.TxtSearchTen.Text);
        }

        private void TxtSearchTen_TextChanged(object sender, EventArgs e)
        {
            this.Search(this.TxtSearchMa.Text, this.TxtSearchTen.Text);
        }

        private void VSlist_AfterEdit(object sender, RowColEventArgs e)
        {
            if (e.Col == 4)
            {
                this.SaveData(e.Row, e.Col);
                string pKhoa = LVYModule.sRight(this.pData.Columns[e.Col].ColumnName.Trim(), 15);
                this.objLG.Load(pKhoa);
                string oldValue = this.objLG.Ma.Trim();
                double num2 = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, 4]), 0, modGeneral.TypeOfValue.Nothing));
                if (e.Col != (this.VSlist.Cols.Count - 1))
                {
                    int num3 = this.VSlist.Cols.Count - 1;
                    for (int i = e.Col + 1; i <= num3; i++)
                    {
                        pKhoa = LVYModule.sRight(this.pData.Columns[i].ColumnName.Trim(), 15);
                        this.objLG.Load(pKhoa);
                        string strCongThuc = this.objLG.DienGiai.Trim().Replace(oldValue, num2.ToString());
                        if (strCongThuc.Trim() != "")
                        {
                            this.VSlist[e.Row, i] = Math.Round(this.objGB.TinhGia(strCongThuc), 0);
                        }
                        else if ((LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, i]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "") | (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, i]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "0"))
                        {
                            this.VSlist[e.Row, i] = RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, e.Col]);
                        }
                        this.SaveData(e.Row, i);
                    }
                }
            }
            else
            {
                this.SaveData(e.Row, e.Col);
            }
        }

        private void VSlist_BeforeEdit(object sender, RowColEventArgs e)
        {
            if (e.Col < 4)
            {
                e.Cancel = true;
            }
        }

        internal virtual ComboBox CboHangSanXuat
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboHangSanXuat;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CboHangSanXuat_SelectedIndexChanged);
                if (this._CboHangSanXuat != null)
                {
                    this._CboHangSanXuat.SelectedIndexChanged -= handler;
                }
                this._CboHangSanXuat = value;
                if (this._CboHangSanXuat != null)
                {
                    this._CboHangSanXuat.SelectedIndexChanged += handler;
                }
            }
        }

        internal virtual ComboBox CboLoaiTien
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboLoaiTien;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CboLoaiTien_SelectedIndexChanged);
                if (this._CboLoaiTien != null)
                {
                    this._CboLoaiTien.SelectedIndexChanged -= handler;
                }
                this._CboLoaiTien = value;
                if (this._CboLoaiTien != null)
                {
                    this._CboLoaiTien.SelectedIndexChanged += handler;
                }
            }
        }

        internal virtual ComboBox CboNhomHang
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboNhomHang;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CboNhomHang_SelectedIndexChanged);
                if (this._CboNhomHang != null)
                {
                    this._CboNhomHang.SelectedIndexChanged -= handler;
                }
                this._CboNhomHang = value;
                if (this._CboNhomHang != null)
                {
                    this._CboNhomHang.SelectedIndexChanged += handler;
                }
            }
        }

        internal virtual Button CmdCapNhatTuDong
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdCapNhatTuDong;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdCapNhatTuDong_Click);
                if (this._CmdCapNhatTuDong != null)
                {
                    this._CmdCapNhatTuDong.Click -= handler;
                }
                this._CmdCapNhatTuDong = value;
                if (this._CmdCapNhatTuDong != null)
                {
                    this._CmdCapNhatTuDong.Click += handler;
                }
            }
        }

        internal virtual Button CmdLoc
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdLoc;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CmdLoc = value;
            }
        }

        internal virtual Label Label1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label1 = value;
            }
        }

        internal virtual Label Label11
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label11;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label11 = value;
            }
        }

        internal virtual Label Label2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label2 = value;
            }
        }

        internal virtual Label Label25
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label25;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label25 = value;
            }
        }

        internal virtual Label Label3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label3 = value;
            }
        }

        internal virtual Panel Panel1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel1 = value;
            }
        }

        internal virtual Panel Panel3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel3 = value;
            }
        }

        internal virtual TextBox TxtSearchMa
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtSearchMa;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.TxtSearchMa_TextChanged);
                if (this._TxtSearchMa != null)
                {
                    this._TxtSearchMa.TextChanged -= handler;
                }
                this._TxtSearchMa = value;
                if (this._TxtSearchMa != null)
                {
                    this._TxtSearchMa.TextChanged += handler;
                }
            }
        }

        internal virtual TextBox TxtSearchTen
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtSearchTen;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.TxtSearchTen_TextChanged);
                if (this._TxtSearchTen != null)
                {
                    this._TxtSearchTen.TextChanged -= handler;
                }
                this._TxtSearchTen = value;
                if (this._TxtSearchTen != null)
                {
                    this._TxtSearchTen.TextChanged += handler;
                }
            }
        }

        internal virtual C1.Win.C1FlexGrid.C1FlexGrid VSlist
        {
            [DebuggerNonUserCode]
            get
            {
                return this._VSlist;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                RowColEventHandler handler = new RowColEventHandler(this.VSlist_AfterEdit);
                RowColEventHandler handler2 = new RowColEventHandler(this.VSlist_BeforeEdit);
                if (this._VSlist != null)
                {
                    this._VSlist.AfterEdit -= handler;
                    this._VSlist.BeforeEdit -= handler2;
                }
                this._VSlist = value;
                if (this._VSlist != null)
                {
                    this._VSlist.AfterEdit += handler;
                    this._VSlist.BeforeEdit += handler2;
                }
            }
        }
    }
}

